﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SharpKit.JavaScript;

namespace SharpKit.Onx
{
    /// <summary>
    /// Base class for all signals
    /// </summary>
    [JsType(Mode = JsMode.Json, Export = false)]
    public abstract class ScriptSignal
    {
        #region Properties
        /// <summary>
        /// Gets the signal type. The signal type is mainly used for internal purposes to sort and query signals by namespace.
        /// </summary>
        [JsProperty(Name = "signalType", NativeField = true)]
        public string SignalType { get { return null; } }

        /// <summary>
        /// Get/sets the tag associated with the signal.
        /// </summary>
        [JsProperty(Name = "tag", NativeField = true)]
        public string Tag { get { return null; } }

        /// <summary>
        /// Gets the signals data properties. The data properties holds the actual signal unique attributes
        /// </summary>
        [JsProperty(Name = "data", NativeField = true)]
        public object Data { get { return null; } }

        /// <summary>
        /// Gets the location.LocationSample
        /// </summary>
        /// <remarks>
        /// Note that the location property represents user's current location only, and is not suitable for other locations (e.g., the center point of a certain circular area).
        /// </remarks>
        [JsProperty(Name = "location", NativeField = true)]
        public LocationSample Location { get { return null; } }

        /// <summary>
        /// Tells if this signal needs to be stored online for later reference.
        /// </summary>
        [JsProperty(Name = "shouldStore", NativeField = true)]
        public bool ShouldStore { get { return false; } }

        /// <summary>
        /// Gets the UTC timestamp when the signal was created.
        /// </summary>
        [JsProperty(Name = "utcTimestamp", NativeField = true)]
        public JsDate UtcTimestamp { get { return null; } }
        #endregion
    }
}